home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1594 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  987 b 

  1. Path: gate.net!news-adm
  2. From: porter@gate.net (Todd Porter)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Dynamic Multi-Dimen. Array
  5. Date: 11 Jan 1996 17:59:59 GMT
  6. Organization: 2Morrow, Inc.
  7. Message-ID: <4d3j6v$1bc8@news.gate.net>
  8. References: <4d337m$lug@news.gate.net> <ALUN.CHAMPION.96Jan11115845@g7240065.bridge.bst.bls.com>
  9. NNTP-Posting-Host: jaxfl2-11.gate.net
  10. Mime-Version: 1.0
  11. Content-Type: Text/Plain; charset=ISO-8859-1
  12. X-Newsreader: WinVN 0.99.5
  13.  
  14. In article <ALUN.CHAMPION.96Jan11115845@g7240065.bridge.bst.bls.com>, 
  15. Alun.Champion@bridge.bst.bls.com says...
  16. >
  17. >In article <4d337m$lug@news.gate.net> porter@gate.net (Todd Porter) writes:
  18. >
  19. >: I need to create an array like float[x][3] where the x can change.  I want 
  20. to 
  21. >: dynamically allocate the memory when I figure out what the x is - Can 
  22. anyone 
  23. >: help out with this?
  24. >
  25. >How about:
  26. >
  27. >  float (*x)[3];
  28. >  int size;
  29. >  ...
  30. >  size = ???;
  31. >  x = new float[size][3];
  32.  
  33. Looks kinda odd but I'll give it a shot.
  34.  
  35. Thanks,
  36.  
  37. Todd
  38.  
  39.  
  40.